/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.klikmee.sms.core.base.communicator;

import java.util.List;

import com.klikmee.sms.core.model.BulkMessage;
import com.klikmee.sms.core.model.OutgoingMessage;
import com.klikmee.sms.core.model.Provider;

/**
 * This interface defines communicatro component responsible for sending,
 * receiving messages and delivery reports from mobile operaters. For each
 * mobile operater concrete communicator must be implemented.
 */
public interface Communicator {

	/**
	 * This method sends sms message over concrete mobile operator
	 * 
	 * @param outgoingMessage
	 */
	public void sendMessage(OutgoingMessage outgoingMessage);

	/**
	 * This method send bulk message over concrete mobile operater
	 * 
	 * @param bulkMessage
	 */
	public void sendBulkMessage(BulkMessage bulkMessage);

	/**
	 * This method returns list of {@link SendSmsIntercepter} objects used to
	 * adjust {@link OutgoingMessage} for sending via concrete communicator.
	 * 
	 * @return
	 */
	public List<SendSmsIntercepter> getSendSmsIntercepters();

	/**
	 * Checks if communicator instance can send bulk message to specified
	 * receiver.
	 * @param receiver TODO
	 * 
	 * @return true if can send, otherwise false1
	 */
	public boolean canHandleBulkMessage(String receiver);
	
	/**
	 * Gets the {@link Provider} instance for this communicator
	 * @return instance of {@link Provider} class
	 */
	public Provider getProvider();
}
